package com.boot.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.boot.entity.Article;
import com.boot.entity.Bbs;
import com.boot.entity.Cars;
import com.boot.entity.Orders;
import com.boot.entity.Rebbs;
import com.boot.entity.Score;
import com.boot.entity.Sections;
import com.boot.entity.Teacher;
import com.boot.entity.Topic;
import com.boot.entity.Users;
import com.boot.service.ArticleService;
import com.boot.service.BbsService;
import com.boot.service.CarsService;
import com.boot.service.OrdersService;
import com.boot.service.RebbsService;
import com.boot.service.ScoreService;
import com.boot.service.SectionsService;
import com.boot.service.TeacherService;
import com.boot.service.TopicService;
import com.boot.service.UsersService;
import com.boot.util.PageHelper;
import com.boot.util.VeDate;


//作者Q Q 14205 27913   毕设成品下载网址 wisdomdd.cn
//定义为控制器
@Controller
// 设置路径
@RequestMapping("/index")
public class IndexController extends BaseController {

	@Autowired
	private TeacherService teacherService;
	@Autowired
	private UsersService usersService;
	@Autowired
	private ArticleService articleService;
	@Autowired
	private CarsService carsService;
	@Autowired
	private SectionsService sectionsService;
	@Autowired
	private OrdersService ordersService;
	@Autowired
	private ScoreService scoreService;
	@Autowired
	private TopicService topicService;
	@Autowired
	private BbsService bbsService;
	@Autowired
	private RebbsService rebbsService;

	// 公共方法 提供公共查询数据
	private void front() {
		this.getRequest().setAttribute("title", "驾校信息管理系统");
		List<Cars> carsList = this.carsService.getFrontCars();
		this.getRequest().setAttribute("hotList", carsList);
	}

	// 首页显示
	@RequestMapping("index.action")
	public String index() {
		/*this.front();*/
		return "users/author";
	}
}
